"use client"

import { timestamp } from "../../about/_helper"

function getProps() {
  const ts = timestamp()
  const n = parseInt(ts.charAt(ts.length - 1))
  // if (n > 5) throw new Error(
  //   `throw error from /demo/error/throw @${ts}`
  // )
  return { ts, n }
}

export default function Page() {
  const { ts, n } = getProps()
  return (
    <main>
      <h1 className="text-7xl">模拟抛出异常</h1>
      <h2 className="text-4xl text-red-600">{ts}-{n}</h2>
    </main>
  )
}
